package cn.cosmosx.controller.calc.param;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * 贷款数据计算参数
 */
@ApiModel(description = "贷款试算请求参数")
@Getter
@Setter
public class CalcParam {
    
    @NotNull(message = "贷款金额 不能为空")
    @ApiModelProperty("贷款金额")
    private BigDecimal loanAmount;
    
    @NotNull(message = "贷款年利率 不能为空")
    @ApiModelProperty(value = "贷款年利率", example = "0.005")
    private BigDecimal yearRate;
    
    @NotNull(message = "贷款期限（月） 不能为空")
    @ApiModelProperty(value = "贷款期限（月）", example = "120")
    private Integer loanPeriods;
    
    @ApiModelProperty("首期还款日")
    private LocalDate startRepaymentDate = LocalDate.now();

}

